//
//  NSTimer+Extension.h
//  AccountEasy
//
//  Created by 黄志刚 on 2020/8/19.
//  Copyright © 2020 AccountEasy. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSTimer (Extension)

// 暂停
- (void)pause;
// 重新开始
- (void)restart;
// 延迟一定时间启动
- (void)restartAfterTimeInterval:(NSTimeInterval)interval;

/**
 block方式回调timer，避免内存泄露
 */
+ (NSTimer *)zz_scheduledTimerWithTimeInterval:(NSTimeInterval)seconds
                                       repeats:(BOOL)repeats
                                         block:(void (^)(NSTimer *timer))block;

@end
